package com.ruoyi.sale.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import com.ruoyi.sale.mapper.SaleConfigStyleMapper;
import com.ruoyi.sale.domain.SaleConfigStyle;
import com.ruoyi.sale.service.ISaleConfigStyleService;

import java.util.List;

/**
 * 样式配置Service业务层处理
 *
 * @author szm
 * @date 2025-11-15
 */
@Service
public class SaleConfigStyleServiceImpl extends ServiceImpl<SaleConfigStyleMapper,SaleConfigStyle> implements ISaleConfigStyleService {

    @Override
    public SaleConfigStyle getByDeptId(long deptId) {
        List<SaleConfigStyle> styleList = baseMapper.getByDeptId(deptId);
        if (styleList.size() > 0){
            return styleList.get(0);
        } else {
            return new SaleConfigStyle();
        }
    }
}
